import random

def createLotteryGroup(num):
    firstFiveNumbers = []
    lastTwoNumbers = []
    for i in range(num):
        firstFiveNumbers = createLottery(5, 1, 35)
        lastTwoNumbers = createLottery(2, 1, 12)
        # print(firstFiveNumbers, lastTwoNumbers)
        printEachGroup(firstFiveNumbers, lastTwoNumbers)


def createLottery(num, beginNum, endNum):
    result = []
    i = 0
    while i < num:
        currentNum = random.randint(beginNum, endNum)
        if currentNum not in result:
            result.append(currentNum)
            i = i + 1
    return result

def printEachGroup(firstGroup, secondGroup):
    splitStr = '          '
    joinStr = ' '
    result = joinStr.join(transferItem(i) for i in firstGroup) + \
        splitStr + joinStr.join(transferItem(i) for i in secondGroup)
    print(result)


def transferItem(item):
    newItem = '00' + str(item)
    length = len(newItem)
    result = newItem[length-2: length]
    return result